package com.jhsw.roadsun.module.business.enums.config;

import cn.hutool.core.util.ArrayUtil;
import lombok.Getter;

/**
 * @author Y.sugar
 * @since 2025/8/19 11:32
 */
@Getter
public enum ConfigEnum {
    /**
     * 项目名称
     */
    PROJECT_NAME("project_name"),

    /**
     * 项目Logo
     */
    PROJECT_LOGO("project_logo"),

    /**
     * 用户协议
     */
    USER_AGREEMENT("user_agreement"),

    /**
     * 隐私政策
     */
    PRIVACY_POLICY("privacy_policy"),

    /**
     * 起始单号
     */
    START_ORDER_NO("start_order_no"),

    /**
     * 下一个待用单号
     */
    NEXT_ORDER_NO("next_order_no"),
    ;

    private final String value;

    ConfigEnum(String value) {
        this.value = value;
    }


    public static ConfigEnum find(String value) {
        return ArrayUtil.firstMatch(s -> s.value.equals(value), values());
    }
}
